package com.zhuozhengsoft.pageoffice6springboot2back.controller;

import com.zhuozhengsoft.pageoffice.OpenModeType;
import com.zhuozhengsoft.pageoffice.PageOfficeCtrl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping(value = "/SwitchFile")

public class SwitchFile {

        @RequestMapping(value = "/Word")
        public String showWord(HttpServletRequest request,String fileName) {
            PageOfficeCtrl poCtrl = new PageOfficeCtrl(request);
            //打开文档
            poCtrl.webOpen("/doc/SwitchFile/"+fileName, OpenModeType.docNormalEdit, "张三");
            return poCtrl.getHtml();
        }

    }
